# encoding: utf-8

import urllib

def main(env):
	queryDict = {"text": env["context"]["selection"].encode("utf8")}
	url = 'http://www.lemoda.net/games/figlet/figlet.cgi?' + urllib.urlencode(queryDict)
	return [("replace",urllib.urlopen(url).read())]
